<?php
/**
 * Created by IDEA.
 * User: dinesh
 * Date: Feb 4, 2013
 * Time: 3:25:12 PM
 * To change this template use File | Settings | File Templates.
 */
 ?>

<link rel="stylesheet" type="text/css" href="css/dhtmlx/grid/skins/dhtmlxgrid_dhx_skyblue.css">
<link rel="STYLESHEET" type="text/css" href="css/dhtmlx/grid/dhtmlxgrid_pgn_bricks.css">
<link rel="STYLESHEET" type="text/css" href="css/dhtmlx/grid/dhtmlxgrid.css">
<link rel="STYLESHEET" type="text/css" href="css/dhtmlx/toolbar/skins/dhtmlxtoolbar_dhx_skyblue.css">
 <link rel="stylesheet" type="text/css" href="css/dhtmlx/calendar/dhtmlxcalendar.css">
 <link rel="stylesheet" type="text/css" href="css/dhtmlx/calendar/skins/dhtmlxcalendar_dhx_skyblue.css">

<script src="js/dhtmlx/grid/dhtmlxgrid.js"></script>
<script src="js/dhtmlx/grid/dhtmlxgridcell.js"></script>
<script src="js/dhtmlx/grid/ext/dhtmlxgrid_filter.js"></script>
<script src="js/dhtmlx/grid/ext/dhtmlxgrid_srnd.js"></script>
<script src="js/dhtmlx/grid/dhtmlxgrid_pgn.js"></script>
<script src="js/dhtmlx/toolbar/dhtmlxtoolbar.js"></script>
<script src="js/dhtmlx/calendar/dhtmlxcalendar.js"></script>


<table width='100%' border='0' cellpadding='0' cellspacing='0'>
				<tr>
			<td>
				<div style="margin-top:10px">
					<!-- Search Div -->
                     <fieldset>
                         <legend>Search Institute</legend>
					<form id="frmSearch" action="#" onsubmit="return false;">

						<table border="0" cellspacing="1px" cellpadding="0px" width="100%">
							<tr>
								<td width="90px">Institute Name:</td>
								<td width="40px"><input size="40px" type="text" id="searchCriteria.instituteName" name="searchCriteria.instituteName" keyfilter="alphanumeric" onKeyDown="doSearch(event)"/></td>

								<td width="40px" align="right">Status :</td>
								<td width="40px"><select  name="searchCriteria.status" id="searchCriteria.status" onchange="doSearch(event)">
                                                    <option value="">--Select--</option>
                                                    <option value="1">Active   </option>
                                                    <option value="0">Inactive </option>
                                                 </select>
								</td>
                                 
								<td width="150px" align="left">
									<button onClick="reloadGrid()" class="clsButtonSmall" id="submitButton">Search</button>
                                    <input type="checkbox" id="autosearch" onClick="enableAutosubmit(this.checked)"> Enable Autosearch
								</td>
							</tr>
						</table>

						<input type="hidden" id="totalRecords" name="page.totalRecords"/>
						<input type="hidden" id="startPosition" name="page.startPosition"/>
						<input type="hidden" id="pageSize" name="page.pageSize"/>

					</form>
                    </fieldset>
				</div>
			</td>
		</tr>
		<tr>
			<td>
				<div>
                        <div id="gridbox" style="width:1000px;height:230px;margin-top:10px;"></div>
                        <div><span id="pagingArea"></span>&nbsp;<span id="infoArea"></span><span id="recfound"></span></div>
                </div>
			</td>
		</tr>

		<tr>

			<td>
                <fieldset>
                        <legend>Institute Details</legend>
                <!-- Data Controls Div -->
                <form method="post" id="frmData" action="">
                <table>
                    <tr>
                        <td>
                          <div id="error"></div>

                              <input type="hidden" id="id" name="id" />
                              <input type="hidden" id="version" name="version" />
                                <fieldset>
                        <legend>Contact Details</legend>
                              <div>
                               <table cellspacing="0">
                                  <tr>
                                      <td width="200px"><label for="instituteName">Institute Name :</label></td>
                                      <td><input style="width:290px" id="instituteName" name="instituteName" type="text" /> <span id="instituteNameInfo"> </span></td>
                                  </tr>
                                   <tr>
                                      <td><label for="instituteAddress">Address :</label></td>
                                      <td><input style="width:290px" id="instituteAddress" name="instituteAddress" type="text" /> <span id="instituteAddressInfo"> </span></td>
                                  </tr>
                                   <tr>
                                      <td><label for="phone">Telephone :</label></td>
                                      <td><input style="width:290px" id="phone" name="phone" type="text" /> <span id="phoneInfo"> </span></td>
                                  </tr>
                                   <tr>
                                      <td><label for="fax">Fax :</label></td>
                                      <td><input style="width:290px" id="fax" name="fax" type="text" /> <span id="faxInfo"> </span></td>
                                  </tr>
                                    <tr>
                                      <td><label for="email">Email :</label></td>
                                      <td><input style="width:290px" id="email" name="email" type="text" /> <span id="emailInfo"> </span></td>
                                  </tr>
                                   <tr>
                                      <td><label for="contactPerson">Contact Person :</label></td>
                                      <td><input style="width:290px" id="contactPerson" name="contactPerson" type="text" /> <span id="contactPersonInfo"> </span></td>
                                  </tr>
                                  <tr>
                                      <td> <label for="instituteCode">Institute Code :</label></td>
                                      <td><input style="width:290px" id="instituteCode" name="instituteCode" type="text" /> <span id="instituteCodeInfo"> </span></td>
                                  </tr>
                                   <tr>
                                      <td> <label for="category">Institute Category:</label></td>
                                      <td><select id="category" name="category" style="width:250px"><option value="">--Select Category--</option>
                                                <?php echo $this->categoryOptions ?>  </select> <br/>  <span id="categoryInfo"></span>
                                </td>
                                  </tr>
                                    <tr>
                                      <td> <label for="parentInstitute">Parent Institute :</label></td>
                                      <td><select id="parentInstitute" name="parentInstitute" style="width:250px"><option value="">--Select Parent Inst--</option>
                                                <?php echo $this->parentInstitute ?>  </select> <br/>  <span id="parentInstituteInfo"></span>
                                </td>
                                  </tr>
                                    <tr>
                                      <td> <label for="instituteCode">Registered Date :</label></td>
                                      <td><input style="width:290px" id="regDate" name="regDate" type="text" /> <span id="regDateInfo"> </span></td>
                                  </tr>

                                  <tr>
                                      <td> <label for="hasSubInst">Has Sub Institute/Division :</label> <input type="checkbox" value="1" id="hasSubInst" name="hasSubInst" checked="checked" >
                                           <span id="hasSubInstInfo"></span></td>
                                      <td> Active : <input type="checkbox" value="1" id="status" name="status" checked="checked" >
                                           <span id="statusInfo"></span>
                                      </td>
                                  </tr>
                                  
                               </table>
                              </div>
                              </fieldset>

                        </td>
                        <td>  <fieldset>
                        <legend>Institute Head Details</legend>

                              <div>
                               <table>
                                  <tr>
                                      <td width="200px"><label for="headName">Head Name :</label></td>
                                      <td><input style="width:300px" id="headName" name="headName" type="text" /> <span id="headNameInfo"> </span></td>
                                  </tr>
                                   <tr>
                                      <td width="200px"><label for="headAddress">Address :</label></td>
                                      <td><input style="width:300px" id="headAddress" name="headAddress" type="text" /> <span id="headAddressInfo"> </span></td>
                                  </tr>
                                   <tr>
                                      <td width="200px"><label for="headPhone">Telephone :</label></td>
                                      <td><input style="width:300px" id="headPhone" name="headPhone" type="text" /> <span id="headPhoneInfo"> </span></td>
                                  </tr>
                                   <tr>
                                      <td width="200px"><label for="headEmail">Email Address :</label></td>
                                      <td><input style="width:300px" id="headEmail" name="headEmail" type="text" /> <span id="headEmailInfo"> </span></td>
                                  </tr>
                                 

                               </table>
                              </div>

                         </fieldset>
                            <fieldset>
                        <legend>Institute RPO Details</legend>

                              <div>
                               <table>
                                  <tr>
                                      <td width="200px"><label for="rpoName">RPO Name :</label></td>
                                      <td><input style="width:300px" id="rpoName" name="rpoName" type="text" /> <span id="rpoNameInfo"> </span></td>
                                  </tr>
                                   <tr>
                                      <td width="200px"><label for="rpoAddress">Address :</label></td>
                                      <td><input style="width:300px" id="rpoAddress" name="rpoAddress" type="text" /> <span id="rpoAddressInfo"> </span></td>
                                  </tr>
                                   <tr>
                                      <td width="200px"><label for="rpoPhone">Telephone :</label></td>
                                      <td><input style="width:300px" id="rpoPhone" name="rpoPhone" type="text" /> <span id="rpoPhoneInfo"> </span></td>
                                  </tr>
                                   <tr>
                                      <td width="200px"><label for="rpoEmail">Email Address :</label></td>
                                      <td><input style="width:300px" id="rpoEmail" name="rpoEmail" type="text" /> <span id="rpoEmailInfo"> </span></td>
                                  </tr>


                               </table>
                              </div>

                         </fieldset>
                        </td>
                    </tr>
                </table>

                   </form>
                </fieldset>

					<table border="0" cellspacing="5px" cellpadding="0px" width="100%" style="margin-top:0px;">
						<tr>
							<td>
								<button id="btnClose" onclick="closePage();" privilege="" class="clsButtonSmall">Close</button>
								<button id="btnAdd" onclick="add();" privilege="INST.ADD" class="clsButtonSmall">Add</button>
								<button id="btnEdit" onclick="edit();" privilege="INST.EDIT" class="clsButtonSmall">Edit</button>
								<button id="btnDelete" onclick="del();" privilege="INST.DELETE" class="clsButtonSmall">Delete</button>
								<button id="btnClear" onclick="initialize();" privilege="" class="clsButtonSmall">Clear</button>
							</td>
							<td width="*" align="right">
								<button id="btnSave" onclick="save();" class="clsButtonSmall">Save</button>
							</td>
						</tr>
					</table>
				</div>
			</td>

		</tr>

	</table>



<script src="js/employee/institute.js"></script>
 
<div id='messagePanel'> </div>